/*
 *  $Id: LockCards.cs 898 2009-11-28 16:12:26Z thenn.erannor $
 *	This file is a part of Ragima CCG.
 *	(C) 2008 Ragima development group.
 *
 *	Licensed under the terms of the GNU GPL License version 2.
 *
 */

namespace Ragima.Affects {
    /// <summary>
    /// Эффект: блокировка карт
    /// Блокирует использование определенных карт.
    /// </summary>
    public class LockCards: Affect {
        public readonly CardPredicate Condition;
        public readonly Languages.Phrase Notice;

        public LockCards(CardPredicate condition, Languages.Phrase notice) {
            Condition = condition;
        }

        public override string Id {
            get { return "lock_cards"; }
        }

        public override Affect Clone() {
            return new LockCards(Condition, Notice);
        }

        public override void SetAffect() {
            base.SetAffect();
            GlobalSummary.AddLockCard(this);
        }
        public override void ResetAffect() {
            base.ResetAffect();
            GlobalSummary.RemoveLockCard(this);
        }
    }
}